home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
176-200
/
183
/
mklib
/
edlib
/
bintoint.c
next >
Wrap
C/C++ Source or Header
|
1995-03-13
|
354b
|
17 lines
/* edlib version 1.0 of 04/08/88 */
/* this function takes a string of binary digits and returns its value */
int bintoint(number)
char *number;
{
int value = 0;
while ( *number )
if ( isbdigit(*number) ) {
value = (value << 1) + toint(*number++);
} else {
return(value);
}
return(value);
}